From ab07b5029ebd29b5dd33d2079dee0a681f60f165 Mon Sep 17 00:00:00 2001 From: "kaf24@labyrinth.cl.cam.ac.uk" Date: Thu, 13 Feb 2003 11:00:22 +0000 Subject: [PATCH] bitkeeper revision 1.22.2.18 (3e4b7ac6lRUYOXBu_qQoWvQ9Gtm2BA) smpboot.c: Fix to per-CPU IDTs. --- xen-2.4.16/arch/i386/smpboot.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen-2.4.16/arch/i386/smpboot.c b/xen-2.4.16/arch/i386/smpboot.c index f7a5f8f56a..6afdd0ecfd 100644 --- a/xen-2.4.16/arch/i386/smpboot.c +++ b/xen-2.4.16/arch/i386/smpboot.c @@ -396,8 +396,8 @@ int cpucount; int __init start_secondary(void *unused) { unsigned int cpu = smp_processor_id(); - /* A 'mem64' suitable for passing to LIDT instruction. */ - unsigned long idt_load[2] = { (IDT_ENTRIES*8)-1, 0 }; + /* 6 bytes suitable for passing to LIDT instruction. */ + unsigned char idt_load[6]; extern void cpu_init(void); @@ -418,7 +418,8 @@ int __init start_secondary(void *unused) */ idt_tables[cpu] = kmalloc(IDT_ENTRIES*8, GFP_KERNEL); memcpy(idt_tables[cpu], idt_table, IDT_ENTRIES*8); - idt_load[2] = (unsigned long)idt_tables[cpu]; + *(unsigned short *)(&idt_load[0]) = (IDT_ENTRIES*8)-1; + *(unsigned long *)(&idt_load[2]) = (unsigned long)idt_tables[cpu]; __asm__ __volatile__ ( "lidt %0" : "=m" (idt_load) ); /* -- 2.30.2